package shuashuami.hb.com.entity.agent;

import org.json.JSONObject;

import shuashuami.hb.com.util.TextTool;

/**
 * created by zhangqi at 2017/7/10
 */
public class ClickerBean {
    private String id;
    private String mobile;
    private String username;
    private String avatar;
    private String parent_id;
    private int status;
    private String addtime;

    private ApplyMsgBean msgBean;

    public ApplyMsgBean getMsgBean() {
        return msgBean;
    }

    public void setMsgBean(ApplyMsgBean msgBean) {
        this.msgBean = msgBean;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getParent_id() {
        return parent_id;
    }

    public void setParent_id(String parent_id) {
        this.parent_id = parent_id;
    }

    public int getStatus() {
        return status;
    }

    public String getStatusName(){
        String str=TextTool.toChinese(status+"");
        return str+"级";

    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getAddtime() {
        return addtime;
    }

    public void setAddtime(String addtime) {
        this.addtime = addtime;
    }

    public void resolveByJson(JSONObject item) throws Exception{
        id=item.getString("id");
        mobile=item.getString("mobile");
        username=item.getString("username");
        avatar=item.getString("avatar");
        parent_id=item.getString("parent_id");
        status=item.getInt("status");
        addtime=item.getString("addtime");

    }
}
